<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Document</title>
</head>
<body>

  <div id='app'>
    <button @click="add">添加一个数据</button>
    <button @click="change">改变这个动态数据</button>
    <div v-if="isShow">
      {{msg}}
    </div>
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const app = new Vue({
    el: '#app'
    ,data:{
      isShow: false
      ,msg: null
    }
    ,methods: {
      add(){
        this.isShow = true
        this.msg = "我是动态添加的数据"
      }
      ,change(){
        this.msg = "改变后的数据"
      }
    }
  })
</script>
</body>
</html>